feat: allow custom sorting in perps from explore cp-7.77.0#29912
Conversation
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokePerps is required because:
SmokeWalletPlatform is required because:
Per tag descriptions: SmokePerps changes to Perps views affect Trending (SmokeWalletPlatform), so both tags are needed. SmokeConfirmations is not needed as no confirmation flows were changed. No controller, Engine, or security-critical code was modified. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ddc377c. Configure here.
|




Description
Allow custom sorting in perps from explore
Changelog
CHANGELOG entry: allow custom sorting in perps from explore
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3170
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-05-08.at.14.09.40.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it changes default sorting behavior and navigation params for the Perps market list, which can affect perceived ordering and persisted sort direction across screens.
Overview
Explore → Perps market list navigation now forwards a default sort option via new
defaultSortOptionIdroute param so the full market list opens with the same ordering as the Explore feed.usePerpsMarketListViewaccepts this override and resets sort direction to the controller default when the override differs from the user’s saved option, while preserving the saved direction when it matches.usePerpsFeednow exposes a per-variantdefaultSortOptionId(backed byPERPS_VARIANT_SORT_OPTION) and keeps search ordering consistent (Fuse relevance preserved for non-macro; macro still sorts by volume).Explore perps sections (
NowTab,CryptoTab,MacroTab,RwasTab,PerpsToggleBlock) were updated to pass the sort option through, and new/updated unit tests cover the override logic and navigation wiring.useStocksFeedwas adjusted so search results include RWAs across chains, while the tab view remains Ethereum-only, with tests added.Reviewed by Cursor Bugbot for commit ddc377c. Bugbot is set up for automated code reviews on this repo. Configure here.